package org.splink.deepsplink.page.request {
	import flash.display.Sprite;

	/**
	 * Transforms a request into an array of  <code>IQable</code> instances which define 
	 * the order and kind of page method invocations (some of them asyncronous) which
	 * are needed to transition from the current page to the desired page.
	 * 
	 * @author Max Kugland
	 */
	public interface IRequestBuilder {

		/**
		 * Builds an array of <code>IQable</code> instances which are to be executed
		 * in the provided order.
		 * 
		 * @param display the <code>Sprite</code> containing the page displays
		 * @param doOpen an array of <code>Node</code> instances which defines the pages 
		 * which need to be opened. the <code>getData()</code> property contains a reference
		 * to the <code>IPageInternal</code> implementation.
		 * @param all an array containing all <code>Node</code> instances
		 * @param pageParams the current page parameters
		 * 
		 * @return an array of <code>IPageProxy</code> instances. 
		 */
		function build(display : Sprite, doOpen : Array, all : Array, pageParams : Array) : Array;
		
		/**
		 * @return the type of the <code>IRequestBuilder</code> implementation
		 */
		function get type() : String;
	}
}
